import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.HashSet;
import java.util.Set;

public class Article extends Produit {

	private Integer stock_global;

    Set<Stock> stocks = new HashSet<Stock>();

	public Article(int id, String nom, float prix){
		super(id, nom, prix, false);
	}
	
    public Set<Stock> getStocks(){
    	Set<Stock> stocks = new HashSet<Stock>();
    	return stocks;
    }
	
    public int getStockTotal(){
    	int quantite_total=0;
    	if(stock_global!=null){
    		for(Stock stock : this.stocks){
    			quantite_total+=stock.getQuantite();
    		}
    	} 
    	return quantite_total;
    	
    }
    
}